{include file="news/header.tpl"}
<link rel="stylesheet" href="../../static/bootstrap/css/my.css">
<link href="../../static/bootstrap/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" media="screen">

<!-- 头部// -->
{literal}
<style type="text/css">
.form_date {
	width: 80px;
	border: 1px #ccc solid;
}
</style>
{/literal} {include file="order/top.tpl"}



<!-- start: Content -->
<div id="content" class="span12">


<div class="row-fluid">


<div class="box span12"><!-- Default panel contents -->



<div class="box-content">
<form name="news" action="/order/export/" method="post"
	class="form-inline">
	<span class="icon-eye-open">实时监控</span>：状态:{$coupons.status} 


 |<a href="/order/verify">校对</a>   注：统计上一次结算的积分id
</form>
  
<table class="table table-striped  table-hover">
	<tr>


		<th  >日期</th>
		<th>总余额</th>
		<th>收入</th>
		<th>支出</th>
		<th>未确认</th>
		
		<th>截至积分流水号</th>

	</tr>
    
    <tr>
		<td ><button type="button" onclick="audit()" class="btn btn-info btn-sm"><span
	class="icon-shopping-cart"> 结算</span></button></td>
		<td><input type="text" class="input-small" disabled id="balance" value="{$coupons.balance}"></td>
		<td><input type="text" class="input-small" disabled  id="income" value="{$coupons.income}"></td>
		<td><input type="text" class="input-small" disabled  id="spend" value="{$coupons.spend}"></td>
		<td><input type="text" class="input-small" disabled  id="unconfirmed" value="{$coupons.unconfirmed}"></td>
		<td><input type="text" class="input-small"    id="coupon_no" value="{$coupons.coupon_no}"></td>
	</tr>

	{foreach from=$audit item=l }
	<tr>







		<td>{$l.add_time|date_format:"%m/%d"}</td>
		<td>{$l.balance}</td>
		<td>{$l.income}</td>
		<td>{$l.spend}</td>
		<td>{$l.unconfirmed}</td>
		
		<td>{$l.coupon_no}</td>

		
	</tr>
	{/foreach}

</table>


<div class="pagination pagination-centered">
<ul id="pager"></ul>
</div>

</div>




</div>


{literal} <script type="text/javascript"
	src="/static/bootstrap/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<script type="text/javascript"
	src="/static/bootstrap/js/bootstrap-datetimepicker.zh-CN.js"
	charset="UTF-8"></script> <script type='text/javascript'>

	function audit(){
    var balance=$("#balance").val();
    var spend=$("#spend").val();
    var income=$("#income").val();
    var unconfirmed=$("#unconfirmed").val();
    var couponid=$("#coupon_no").val();

	$.post("/order/setaudit",{balance:balance,spend:spend,income:income,unconfirmed:unconfirmed,coupon_no:couponid},function(data){
       alert(data.message);
       location.reload();
   },"json")
	}




</script> {/literal} {include file="news/footer.tpl"}